﻿@using Combres
@model FCTC_Web.Models.Article
    
@* <link rel="stylesheet" href="@Url.Content("~/Scripts/jquery.wysiwyg.css" )" type="text/css" />
 <script src="@Url.Content("~/Scripts/jquery.wysiwyg.js")" type="text/javascript"></script>*@
  <link rel="stylesheet" href="@Url.Content("~/Scripts/jquery.wysiwyg.css" )" type="text/css" />
 @Combres.HtmlExtensions.CombresLink("backjsRichEditor")
<style rel="stylesheet">
     textarea{ border:1px #cecece solid; width:98%; height:300px; margin-left:8px;}
</style>
<script type="text/javascript">
    $(document).ready(function () {

        (function ($) {
            $('#Content').wysiwyg({
                controls: {
                    strikeThrough: { visible: true },
                    underline: { visible: true },

                    separator00: { visible: true },

                    justifyLeft: { visible: true },
                    justifyCenter: { visible: true },
                    justifyRight: { visible: true },
                    justifyFull: { visible: true },

                    separator01: { visible: true },

                    indent: { visible: true },
                    outdent: { visible: true },

                    separator02: { visible: true },

                    subscript: { visible: true },
                    superscript: { visible: true },

                    separator03: { visible: true },

                    undo: { visible: true },
                    redo: { visible: true },

                    separator04: { visible: true },

                    insertOrderedList: { visible: true },
                    insertUnorderedList: { visible: true },
                    insertHorizontalRule: { visible: true },

                    h4mozilla: { visible: true && $.browser.mozilla, className: 'h4', command: 'heading', arguments: ['h4'], tags: ['h4'], tooltip: "Header 4" },
                    h5mozilla: { visible: true && $.browser.mozilla, className: 'h5', command: 'heading', arguments: ['h5'], tags: ['h5'], tooltip: "Header 5" },
                    h6mozilla: { visible: true && $.browser.mozilla, className: 'h6', command: 'heading', arguments: ['h6'], tags: ['h6'], tooltip: "Header 6" },

                    h4: { visible: true && !($.browser.mozilla), className: 'h4', command: 'formatBlock', arguments: ['<H4>'], tags: ['h4'], tooltip: "Header 4" },
                    h5: { visible: true && !($.browser.mozilla), className: 'h5', command: 'formatBlock', arguments: ['<H5>'], tags: ['h5'], tooltip: "Header 5" },
                    h6: { visible: true && !($.browser.mozilla), className: 'h6', command: 'formatBlock', arguments: ['<H6>'], tags: ['h6'], tooltip: "Header 6" },

                    separator07: { visible: true },

                    cut: { visible: true },
                    copy: { visible: true },
                    paste: { visible: true }
                }
            });
        })(jQuery);

        $('#ReportingTime').datetimepicker(
                { hourMin: 9,
                    hourMax: 16,
                    showOn: 'both',
                    buttonImage: '/images/calendar.png',
                    buttonImageOnly: true
                });
            });


</script>
@Html.ValidationSummary(true)
<fieldset>
    <legend>文章内容</legend>
    <table width="100%">
        <tr>
            <td>
                <div class="editor-label">
                    @Html.LabelFor(model => model.HeadLine)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.HeadLine)
                    @Html.ValidationMessageFor(model => model.HeadLine)
                </div>
            </td>
            <td>
                <div class="editor-label">
                    @Html.LabelFor(model => model.SecondHeadLine)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.SecondHeadLine)
                    @Html.ValidationMessageFor(model => model.SecondHeadLine)
                </div>
            </td>
        </tr>
        <tr>
            <td width="80%" colspan="2">
                <div class="editor-label">
                    @Html.LabelFor(model => model.Content)
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="editor-field">
                    @Html.TextAreaFor(model => model.Content)
                    @Html.ValidationMessageFor(model => model.Content)
                </div>
            </td>
        </tr>
    </table>
</fieldset>
<fieldset>
    <legend>相关信息</legend>
   <div class="editor-label">
        @Html.LabelFor(model => model.Author)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Author)
        @Html.ValidationMessageFor(model => model.Author)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.From)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.From)
        @Html.ValidationMessageFor(model => model.From)
    </div>
   <div class="editor-label">
        @Html.LabelFor(model => model.ArticleType)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.ArticleType, new SelectList(new List<string> { "问答", "市场", "促销", "拍卖", "热点", "知识", "活动", "车展", "政策","文档","品牌" ,"新车","其它" }), "--请选择--")
     @Html.ValidationMessageFor(model => model.ArticleType)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.ReportingTime)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(i => i.ReportingTime, new { id = "ReportingTime", @name = "ReportingTime" })
        @Html.ValidationMessageFor(model => model.ReportingTime)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Keyword)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Keyword)
        @Html.ValidationMessageFor(model => model.Keyword)
    </div>
    @* 
    @Html.HiddenFor(model => model.ID) *@
</fieldset>
@Html.Partial(@"~\views\shared\controls\otherschange.cshtml", Model)
<p>
    <input type="submit" value="保存" />
</p>
@Html.ActionLink("回到列表", "Index")
